require 'semantictext/span'

module SemanticText
  class Tag < Span
    attr_reader :key
    
    def initialize(key, value)
  		@text = value
  		@key = key
  	end
  	
  	# export as html
  	def export_html
      "<a href=\"#{key}:#{text}\">#{key}:#{CGI.escapeHTML(text)}</a>"
    end
    
  end
end